<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: edy
  Date: 2022/4/1
  Time: 1:04 上午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<form action="${pageContext.request.contextPath}/user/find" method="post">
    请输入用户名：<input type="text" name="name" value="${parm}" placeholder="请输入用户名(可以模糊搜索)">&nbsp;
    <input type="submit" value="查找">
</form>
<a href="${pageContext.request.contextPath}/user/pageadd">增加</a>
<table border="1px">
    <tr>
        <th>用户名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>地址</th>
        <th>操作</th>
        <th>操作</th>
    </tr>

    <c:forEach items="${userList}" var="user">
        <tr>
            <td>${user.name}</td>
            <td>${user.age}</td>
            <td>${user.sex}</td>
            <td>${user.address}</td>
            <td><a href="${pageContext.request.contextPath}/user/delete?name=${user.name}">删除</a></td>
            <td><a href="${pageContext.request.contextPath}/user/pageupdate?name=${user.name}">修改</a></td>

            <td></td>


        </tr>


    </c:forEach>
</table>
</body>
</html>
